package eventStrategies;

import java.util.HashMap;

import view.AbstractView;
import view.EViewList;
import eventManager.AppEvent;
import events.ECodeEventList;
import events.stateMachine.strategyState.DefaultViewFarEvent;

public class DefaultViewFarStrategy extends IEventResponse {

	private HashMap<EViewList, AbstractView> views;
	
	public DefaultViewFarStrategy(HashMap<EViewList, AbstractView> views) {
		super(ECodeEventList.DEFAULT_VIEW_FAR);
		this.views = views;
	}

	@Override
	public void execute(AppEvent event) {
		DefaultViewFarEvent fullEvent = (DefaultViewFarEvent) event;
		
		if (views.containsKey(EViewList.DEFAULT_FAR)) {
			fullEvent.rootNode.attachChild(views.get(EViewList.DEFAULT_FAR).getSpatial());
		}
		
	}

}
